<?php

namespace Zenva\WorkoutBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\ORM\EntityRepository;

class CuposAnualesType extends AbstractType
{
    protected static $anios = array(2014, 2015, 2016);
    
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('Descripcion'
                 ,'text'
                 , array('label'  => 'Descripción',
                         'attr'   =>  array('class'   => 'textoGrande separacion')
                        )
                 )
            ->add('Anio'
                 ,'choice'
                 , array('choices' => array(2014 => 2014, 2015 => 2015)
                 ,'data' => 2014
                 ,'label' => 'Año'
                 ,'attr'   =>  array('class'   => 'separacion')
                        )
                 )
            ->add('Monto'
                 ,'text'
                 , array('label'  => 'Monto'
                        ,'attr'   =>  array('class'   => 'separacion textoChico')
                        )
                 )
            ->add('Activo')
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Zenva\WorkoutBundle\Entity\CuposAnuales'
        ));
    }

    public function getName()
    {
        return 'zenva_workoutbundle_cuposanualestype';
    }
}
